﻿using System;
using System.Collections.Generic;

namespace helloworld {
    class Program {
        static void Main (string[] args) {
            /*
            Console.WriteLine ("Hello World!");
            string afriend = "f";
            string bfriend = "j";
            Console.WriteLine ($"hello {afriend}{bfriend}" + "f" + afriend);
            Console.WriteLine ($"{afriend} {bfriend} {afriend+bfriend}");
            Console.WriteLine ($"length of {afriend+bfriend} is {afriend.Length+bfriend.Length}");
            string greeting = "      Hello World!       ";
            Console.WriteLine ($"[{greeting}]");

            string trimmedGreeting = greeting.TrimStart ();
            Console.WriteLine ($"[{trimmedGreeting}]");

            trimmedGreeting = greeting.TrimEnd ();
            Console.WriteLine ($"[{trimmedGreeting}]");

            trimmedGreeting = greeting.Trim ();
            Console.WriteLine ($"[{trimmedGreeting}]");

            string sayHello = "Hello World!";
            Console.WriteLine (sayHello);
            sayHello = sayHello.Replace ("Hello", "Greetings");
            Console.WriteLine (sayHello);

            Console.WriteLine (sayHello.ToUpper ());
            Console.WriteLine (sayHello.ToLower ());

            string songLyrics = "You say goodbye, and I say hello";
            Console.WriteLine (songLyrics.Contains ("goodbye"));
            Console.WriteLine (songLyrics.Contains ("greetings"));

            int max = int.MaxValue;
            int min = int.MinValue;
            Console.WriteLine ($"The range of integers is {min} to {max}");
            int what = max + 3;
            Console.WriteLine ($"An example of overflow: {what}");

            double a = 5;
            double b = 4;
            double c = 2;
            double d = (a + b) / c;
            Console.WriteLine (d);

            double maxd = double.MaxValue;
            double mind = double.MinValue;
            Console.WriteLine ($"The range of double is {mind} to {maxd}");

            double third = 1.0 / 3.0;
            Console.WriteLine (third);
            

            
            decimal mindec = decimal.MinValue;
            decimal maxdec = decimal.MaxValue;
            Console.WriteLine ($"The range of the decimal type is {mindec} to {maxdec}");

            double a = 1.0;
            double b = 3.0;
            Console.WriteLine (a / b);

            decimal c = 1.0M;
            decimal d = 3.0M;
            Console.WriteLine (c / d);

            double pi=Math.PI;
            Console.WriteLine(pi);

            decimal piM=(decimal)Math.PI;
            Console.WriteLine(piM);
            

            
            int a=1;
            int sum=0;
            for(a=1;a<=20;a++)
            {
                if(a%3==0)
                {
                    sum+=a;
                }
            }
            Console.WriteLine($"the sum is {sum}");
            

            var name = "<f>";
            name = "'f'";
            Console.WriteLine ($"Hello, {name}. It's a pleasure to meet you!");
            */
            var fibonacciNumbers = new List<int> { 1, 1 };

            while (fibonacciNumbers.Count < 20) {
                var previous = fibonacciNumbers[fibonacciNumbers.Count - 1];
                var previous2 = fibonacciNumbers[fibonacciNumbers.Count - 2];

                fibonacciNumbers.Add (previous + previous2);
            }
            foreach (var item in fibonacciNumbers)
                Console.WriteLine (item);
        }
    }
}